<?php
if(isset($_SERVER['HTTP_ORIGIN'])) {
	header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);
}
if($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
	header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
	header('Access-Control-Allow-Headers: content-type');
	header('Access-Control-Allow-Credentials: true');
	header('Content-type: application/json;charset=utf-8');
	exit(json_encode(['code' => 0, 'msg'=>'Success']));
};

define('DS', DIRECTORY_SEPARATOR);
define('PUBLIC_PACH', __DIR__ . DS);
define('BASE_PATH', dirname(PUBLIC_PACH) . DS);
define('SRC_PATH', BASE_PATH . 'src' . DS);

require SRC_PATH . 'bootstrap_web.php';